<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>注册</title>
<script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></script>
<link rel="stylesheet"
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body ng-app="registerapp" >
	<div class="container" ng-controller="registerController">
		<form  name="myForm" novalidate>
			<div class="row clearfix">

				<div class="col-md-4 column"></div>
				<div class="col-md-6 column">
					<div class="page-header">
						<h1>注册</h1>
					</div>
				</div>
				<div class="col-md-2 column"></div>
			</div>
			<div class="row clearfix">
				<div class="col-md-4 column"></div>
				<div class="col-md-4 column">
					<div class="row clearfix">
						<div class="col-md-12 column">
					
							<label for="name">用户名</label> 
							<input type="text" 
								class="form-control" id="name" name="name" ng-model="username"
								placeholder="请输入名称" required>
				<span style="color:red" ng-show="myForm.name.$dirty && myForm.name.$invalid">
                      <span ng-show="myForm.name.$error.required">用户名是必须的。</span>
                                    </span>
						</div>
					</div>
					<div class="row clearfix">
						<div class="col-md-12 column">
							<label for="name">密码</label> <input type="password"
								class="form-control" id="pwd" name="pwd" ng-minlength="6"
                    ng-maxlength="20" ng-model="pwd" placeholder="请输入名称" required>
					<span style="color: red" ng-show="myForm.pwd.$dirty && myForm.pwd.$invalid">
						<span ng-show="myForm.pwd.$error.required">密码是必须的</span>
                        <span ng-show="myForm.pwd.$error.minlength">*密码长度不小于6</span>
                        <span ng-show="myForm.pwd.$error.maxlength">*密码长度不超过20</span>
                        
                    </span>
						</div>
					</div>
					<div class="row clearfix">
						<div class="col-md-12 column">
							<label for="name">再次输入密码</label> <input type="password"
								class="form-control" id="pwd1" name="pwd1"ng-model="pwd1"
								placeholder="请输入名称" required>
								<span style="color: red" ng-show="myForm.pwd.$valid">
                        <span ng-show="pwd1!=pwd">*两次密码输入不一致</span>
                    </span>
						</div>
					</div>
					
					<div class="row clearfix">
						<div class="col-md-12 column">
							<label for="name">邮箱</label> <input type="email"
								class="form-control" id="email" name="email"ng-model="email"
								placeholder="请输入名称" required>
								<span style="color:red" ng-show="myForm.email.$dirty && myForm.email.$invalid">
<span ng-show="myForm.email.$error.required">邮箱是必须的。</span>
<span ng-show="myForm.email.$error.email">非法的邮箱地址。</span>
</span>
						</div>
					</div>
					<div class="row clearfix">
						<div class="col-md-12 column">
						  <select ng-model="selectId" ng-init="selectId='1'">
   
    <option value="1">java1
    <option value="2">java2
    <option value="3">java3
    <option value="4">java4
    <option value="5">java5
  </select>
							</div>
					</div>
					<div class="row clearfix">
						<div class="col-md-12 column">
							<button id="btnlogin" ng-click="onclickRegister()" ng-disabled="myForm.name.$dirty && myForm.name.$invalid||  
myForm.pwd.$dirty && myForm.pwd.$invalid||pwd1!=pwd||myForm.mobile.$dirty && myForm.mobile.$invalid||myForm.email.$dirty && myForm.email.$invalid" type="button"
								class="btn btn-primary">注册</button>
						</div>
					</div>
				</div>
				<div class="col-md-4 column"></div>
			</div>
				<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">注册失败</h4>
            </div>
            <div class="modal-body" id="model"></div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary">提交更改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
		</form>
	</div>
	<script type="text/javascript" src="/life/wsq/js/registerP.js"></script>
</body>
</html>